package config

import "github.com/spf13/viper"

type Mysql struct {
	User     string
	Password string
	Host     string
	Port     int
	Database string
}

type Redis struct {
	Host     string
	Port     int
	Password string
	Database int
}

type Config struct {
	Mysql Mysql
	Redis Redis
}

var AppConfig Config

func Init() {
	viper.SetConfigFile("config/dev.yaml")
	viper.ReadInConfig()
	viper.Unmarshal(&AppConfig)
}
